<?php
$translator = \Velacolib\Utility\Utility::translate();
?>
<!-- start: Container -->
<link rel="stylesheet" href="<?php echo $this->basePath(); ?>/templates/front/css/user.css">
<div class="page-header">
    <div class="row">
       <div class="col-lg-3 col-sm-3 col-md-3">
          <div class="header-menu-ver"><?=$translator->translate('Information management')?></div>
       </div>
        <div class="col-lg-9 col-sm-9 col-md-9">
            <?=$translator->translate('Personal information')?>
        </div>
    </div>
</div>

<div class="content-body" >


        <div class="row" style="margin-top: 20px;margin-bottom: 20px">
            <div class="col-sm-3 col-lg-3 col-md-3">
                <div class="sidebar-nav">
                    <div class="navbar navbar-default nav-userprofile" role="navigation">
                        <div class="navbar-header">
                            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-navbar-collapse">
                                <span class="sr-only">Toggle navigation</span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </button>
                            <span class="visible-sm visible-xs navbar-brand">User menu</span>
                        </div>
                        <div class="navbar-collapse collapse sidebar-navbar-collapse">
                            <ul class="nav navbar-nav navbar-nav-vela">
                                <li><a href="/user/profile"><?=$translator->translate('Personal information')?></a></li>
                                <li><a href="/user/changepass"><?=$translator->translate('Change password')?></a></li>
                                <!--<li><a  href="/user/notice"><?=$translator->translate('Notification')?> <span class="badge">1,118</span> </a></li>  -->
                            </ul>
                        </div><!--/.nav-collapse -->
                    </div>
                </div>
            </div>
            <form action="/user/profile" method="post" enctype="multipart/form-data" id="profile-form" name="profile-form" class="form require-validate">
            <div class="col-sm-6 col-lg-6 col-md-6">

                <div class="form-group group_validate">
                    <label><?=$translator->translate('Fullname')?></label>
                    <input req="true" type="text" name="name" id="name" class="form-control input-sm" value="<?=$auth->name?>">
                </div>
                <div class="form-group group_validate">
                    <label><?=$translator->translate('Address')?></label>
                    <input req="true" type="text" name="address" id="address" class="form-control input-sm" value="<?=$auth->address?>">
                </div>
                <div class="form-group group_validate">
                    <label><?=$translator->translate('Birthday')?></label>
                    <input type="text"  name="birthday" class="form-control input-sm timepicker" value="<?php echo $auth->birthday ?>">
                </div>
                <div class="form-group group_validate">
                    <label><?=$translator->translate('Homephone')?></label>
                    <input type="text" name="telephone" class="form-control input-sm" value="<?=$auth->telephone?>">
                </div>
                <div class="form-group group_validate">
                    <label><?=$translator->translate('Cellphone')?></label>
                    <input req="true" type="text" name="phone" class="form-control input-sm" value="<?=$auth->phone?>">
                </div>
                <div class="form-group group_validate">
                    <label>Yahoo Id</label>
                    <input  type="text" name="yahooid" class="form-control input-sm" value="<?=$auth->yahooid?>">
                </div>
                <div class="form-group group_validate">
                    <label>Skype Id</label>
                    <input  type="text" name="skypeid" class="form-control input-sm" value="<?=$auth->skypeid?>">
                </div>
                    <div class="form-group checkbox">
                        <input <?php if($auth->zalo == 1){echo 'checked="checked"' ;} ?>   type="checkbox" name="zalo" value="1" class="check"> Zalo
                    </div>
                    <div class="form-group checkbox">
                        <input <?php if($auth->kakaotalk == 1){echo 'checked="checked"' ;} ?>  type="checkbox" name="kakaotalk" class="check" value="1"> Kakao Talk
                    </div>
                    <div class="form-group checkbox">
                        <input <?php if($auth->viber == 1){echo 'checked="checked"' ;} ?> type="checkbox" name="viber" class="check" value="1"> Viber
                    </div>


                <div class="form-group group_validate">
                    <label><?=$translator->translate('Avatar')?></label>
                    <div class="fileUpload btn btn-success" style="">   <span><?=$translator->translate('Select Image')?></span><input type="file" name="avatar" class="upload" >  </div>
                </div>

                <div class="form-group">
                    <button type="submit" class="btn btn-danger" ><?=$translator->translate('Update')?></button>
                </div>
            </div>
            </form>
            <div class="col-sm-3 col-lg-3 col-md-3">
                <label><?=$translator->translate('Avatar')?></label> </br>
                <?php if($auth->avatar != null && $auth->avatar != ''){ ?>
                    <img class="user_avatar" src="<?=$auth->avatar?>" />
               <?php } ?>
            </div>
        </div>


</div>
<script>
      $(document).ready(function(){
          $("input.check").click(function(){
              if($(this).attr('checked')=='checked'){
                  $(this).removeAttr("checked");
              }
          })  ;
      })  ;
</script>